﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using SilverlightDesktop.Controls;

namespace VAdvantage.Apps
{
    public partial class CFrame : Form
    {

        /** Window ID			*/
        private int p_AD_Window_ID = 0;

        public CFrame()
        {
            InitializeComponent();
        }

        public CFrame(String text)
            : this()
        {
            //txt.Text = "WIndow ID "+text;
        }


        /// <summary>
        /// Get Content Pane
        /// </summary>
        /// <returns></returns>
        public Grid ContentGrid
        {
            get { return LayoutRoot; }
        }


        /// <summary>
        ///Set CONTENT AREA
        /// of main form
        /// this is the actual area available for showing or adding controls on the form
        /// </summary>
        /// <param name="ctrl"></param>
        public void SetContentGrid(Control ctrl)
        {
            LayoutRoot.Children.Add(ctrl);
        }


        /// <summary>
        /// Set Title
        /// </summary>
        /// <param name="title"></param>
        public void SetTitle(String title)
        {
            base.Title = Utility.Util.CleanMnemonic(title);
            // this.Name = Utility.Util.CleanMnemonic(title);
        }

        /// <summary>
        ///Returns the AD_Window_ID.
        /// </summary>
        /// <returns></returns>
        public int GetAD_Window_ID()
        {
            return p_AD_Window_ID;
        }	//	getAD_Window_ID

        /// <summary>
        /// window_ID The AD_Window_ID to set.
        /// </summary>
        /// <param name="window_ID"></param>
        public void SetAD_Window_ID(int window_ID)
        {
            p_AD_Window_ID = window_ID;
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

        protected void SetIcon(ImageSource img)
        {
            if (img != null)
                this.Icon = img;

        }


    }
}
